<template>
    <div>
        <header class="header_search_red header_search_white mint-header">
			<div class="mint-header-button is-left">
                <h1 class="mint-header-title title_white">{{title}}<span class="mint_small_text" v-if="!smalltextShow">{{smalltext}}</span></h1>
			</div> 
            <div class="mint-header-button header_right">
				<a href="javascript:void(0)" class="router-link-active" @click="gotobtn">
					<button class="mint-button mint-button--default mint-button--normal">
                        <label class="mint-button-text set-text" v-if="settext">{{settext}}</label>
                        <i class="iconfont icon-search_icon" v-if="noBack"></i>
                        <i class="iconfont icon-jia" v-if="addto"></i>
                        <i class="iconfont icon-gengduo" v-if="share"></i>
					</button>
				</a>
			</div>
		</header>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                
            }
        },
        methods: {
            // gotoback(ev) {
            //     if(this.backFn){
            //         this.backFn();
            //     }else {
            //         if(this.$router){
            //             this.$router.back()
            //         }else {
            //             window.history.back();
            //         }
            //     }
            // },
            gotobtn() {
                this.$emit('done');
            }
        },
        props: ['title', 'backFn', 'settext', 'done', 'noBack', 'smalltext', 'smalltextShow', 'addto', 'share']
    }
</script>
<style>
    .mint_small_text {
        font-size: 0.22rem;
        line-height: 0.36rem;
        display: inline-block;
    }
    .set-text {
        font-size: 0.3rem !important;
        line-height: 0.48rem;
        display: inline-block;
        vertical-align: middle;
        margin-bottom: 0.3rem;
    }
    .icon-jia {
        font-size: 0.36rem !important;
        line-height: 0.48rem;
        display: inline-block;
        vertical-align: middle;
        margin-bottom: 0.1rem;
    }
    .header_right .icon-gengduo {
        line-height: 0.48rem;
        display: inline-block;
        vertical-align: middle;
        margin-bottom: 0.3rem;
    }
</style>